<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="include/base.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<%@ include file="include/style.jsp" %>
	<style type="text/css">
		
body{
	margin:0px;
	padding:0px;
	font-size:13px;
	font-family: Trebuchet MS,Liberation Sans,DejaVu Sans,sans-serif;
	background:url(../img/2.jpg) center center fixed;
	color:black;
	
}

#mylogo{
		position: absolute;
		top: 10px;
		left: 200px;
		background: url(../img/t.jpg);
		height:90px;
		width: 192px;

	}



.top1{
	background-color:#25304C;
	height:100px;
	line-height:26px;
}
.top1 .top2{
	width:980px;
	height:26px;
	margin:0 auto;
	line-height:26px;
	
}
.top1 .top2 .top_left{
	width:113px;
	height:17px;
	float:left;
	margin-top:6px;
}
.top1 .top2 .top_right{
	width:602px;
	height:22px;
	float:right;
	margin-top:1px;
	line-height:22px;

}
.top1 .top2 .top_right a{
	margin-left:25px;
	color:#78C16F;
	font-weight:bold;
	text-decoration:none;

}
.top1 .top2 .top_right a:hover{
	text-decoration:underline;
}
.con{
		width: 950px;
		
		background-color: #fff;
		margin: 0 auto;
	}
	</style>


</head>
<body>
		<%@ include file="include/top.jsp"%>
	<div style="">
		
		<ul class="breadcrumb" style="height:20px;background-color:#1E2537;border-radius: 0px;margin-bottom:0px;">
			<div id="" class="container">
				 <li><a href="index.jspx">Home</a> <span class="divider">/</span></li>
				  <li><a href="userorderlist.jspx">用户中心</a> <span class="divider">/</span></li>
				  <li class="active">评论管理</li>
			</div>
		 
		</ul>
	</div>
	<!--这边是用户中心了-->
	<div class="con" style="padding:25px;">
		<div class="tabbable tabs-left"> 
		  <ul class="nav nav-tabs">
		    <li ><a href="userorderlist.jspx"><span class="label label-warning">1</span>用户订单</a></li>
		    <li><a href="favlist.jspx" ><span class="label label-success">2</span>收藏夹</a></li>
		    <li><a href="usermessage.jspx" ><span class="label label-important">3</span>修改密码</a></li>
		    <li><a href="userpic.jspx"><span class="label">4</span>修改头像</a></li>
		    <li class="active"><a href="commentlist.jspx"><span class="label label-inverse">5</span>评论管理</a></li>
		    <li><a href="userexit.jspx" id="a"><span class="label label-info">6</span>安全退出</a></li>
		   
		  </ul>
		  <div class="tab-content">
		    <div class="tab-pane active" id="tab1">
		      <!--收藏的书籍-->
				<div class="span10" style="float:right;">
					<h4><i class="icon-th-list"></i>所有评论列表</h4>
					<hr/>
					<c:if test="${not empty sessionScope.commentmessage }">
						<div class="alert alert-success">
			              <button type="button" class="close" data-dismiss="alert">×</button>
			              <strong>Well done!</strong> ${sessionScope.commentmessage }
			            </div>
			            <%
			            	session.removeAttribute("commentmessage");
			            %>
					</c:if>
					
					<table class="table table-hover">
						
						<thead>
							<tr>
								<th>书籍名称</th>
								<th>数量</th>
								<th>单价</th>
								<th>总价</th>
								<th>是否付款</th>
								<th>发货状态</th>
								<th>评论状态</th>
							</tr>
						</thead>
							<tbody>
							<c:if test="${empty list }">
								<tr>
									<td colspan="3">您还没有添加任何的订单！！赶紧去订购宝贝吧！！</td>
								</tr>
								<tr>
									<td></td>
								</tr>
							</c:if>
							<c:forEach items="${list }" var="s">
								<tr>
									<td><a href="showbook.jspx?id=${s.bookid }">${s.bookname }</a></td>
									<td>${s.num }</td>
									<td>${s.bookprice }</td>
									<td>${s.total }</td>
									
									<c:choose>
										<c:when test="${s.order.pay == '未付款' }">
											<td><span class="label label-warning">${s.order.pay }</span></td>
										</c:when>
										<c:otherwise>
											<td><span class="label label-success">${s.order.pay }</span></td>
										</c:otherwise>
									</c:choose>
									
									
									<c:choose>
										<c:when test="${s.order.state == '未发货' }">
											<td><span class="label label-warning">${s.order.state }</span></td>
										</c:when>
										<c:otherwise>
											<td><span class="label label-success">${s.order.state }</span></td>
										</c:otherwise>
									</c:choose>
									
									
									
									
									<c:choose>
										<c:when test="${s.order.pay == '未付款' }">
											<td><a href="javascript:;" class="btn" disabled>未付款</a></td>
										</c:when>
										<c:when test="${s.order.state == '未发货' }">
											<td><a href="javascript:;" class="btn" disabled>未发货</a></td>
										</c:when>
										<c:when test="${empty s.comment.content }">
											<td><a href="submitcomment.jspx?bookid=${s.bookid }" class="btn btn-primary">点此评论</a></td>
										</c:when>
										<c:otherwise>
											<td><a class="btn btn-success">已评论</a></td>
										</c:otherwise>
									</c:choose>
									
								</tr>
							</c:forEach>
							
						</tbody>
					</table>
				</div>

				
					<!-- 这边是分页效果 -->
				    			<%--<div class="pagination" style="float:right;margin-right:70px;margin-top:20px;">
								  <ul>
								  	<c:choose>
								  		<c:when test="${page.nowPageNum == 1 }">
								  			<li class="disabled"><a href="#">首页</a></li>
								  		</c:when>
								  		<c:otherwise>
								  			<li><a href="userorderlist.jspx?p=1">首页</a></li>
								  		</c:otherwise>
								  	</c:choose>
								  	
							<c:forEach items="${solid }" var="s">
									<c:choose>
										<c:when test="${page.nowPageNum == s }">
											<li class="disabled"><a href="#">${s }</a></li>
										</c:when>
										<c:otherwise>
											<li><a href="userorderlist.jspx?p=${s }">${s }</a></li>
										</c:otherwise>					
									</c:choose>
							</c:forEach>
									<c:choose>
										<c:when test="${page.nowPageNum == page.totalpage}">
											<li class="disabled"><a href="#">尾页</a></li>
										</c:when>
										<c:otherwise>
											<li><a href="userorderlist.jspx?p=${page.totalpage }">尾页</a></li>
										</c:otherwise>
									</c:choose>
									
							 	</ul>
							</div>
				

				--%><div class="clear">
					
				</div>


		    </div>
		    
		  </div>
		</div>

		<footer>
					 <hr>
					<font>© 2012-2013 <i class="icon-hand-right"></i> 夼趸蒋</font>
				</footer>
	</div>
	<%@ include file="include/bottom.jsp" %>
	<script src="../js/jquery.js" type="text/javascript"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<%--<script type="text/javascript">
		$(document).ready(function(){
			$("#a").click(function(){
				location.href="userexit.jspx";
			});
		});
	</script>
--%></body>
</html>